/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.OI;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.templates.commands.DriveWithJoy;


/**
 *
 * @author Developer
 */
public class ManualDrivetrain extends Subsystem
{
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    RobotDrive drive;
   
    
    
    private static ManualDrivetrain instance = null;
    
    public void initDefaultCommand()
    {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new DriveWithJoy());
    }
    public ManualDrivetrain()
    {
        drive = new RobotDrive(RobotMap.frontLeftMotor1, RobotMap.rearLeftMotor1, RobotMap.frontRightMotor1, RobotMap.rearRightMotor1);
        drive.setSafetyEnabled(false);
        
    }
    public static ManualDrivetrain getInstance()
    {
        if (instance == null)
        {
            instance = new ManualDrivetrain();
        }
        return instance;
    }
   
    public void driveWithJoy(double y, double x)
    {
        drive.arcadeDrive(-y,-x,false);
//        drive.arcadeDrive(OI.stick,y,OI.stick,x,false);
    }
    public void UpShift()
    {
    }
    public void DownShift()
    {
    }
}